package easy;

import java.util.Arrays;
import java.util.Collections;

public class Solution_217 {

    public static boolean containsDuplicate(int[] nums) {
        Arrays.sort(nums);
        for (int i = 1; i < nums.length; i++) {
            if (nums[i]==nums[i-1]) {
                return true;
            }
        }
        return false;
        /*int[] arr = new int[nums.length+1];

        for (int i = 0; i < nums.length; i++) {
            arr[i+1] = arr[i] ^ nums[i];
        }

        int number = arr[nums.length-1];
        for (int i = 1; i < arr.length-1; i++) {
            if (arr[i]==0 || arr[i]==number) {
                return true;
            }
        }*/

    }

    public static void main(String[] args) {
        int[] a = {3,3};
        System.out.println(containsDuplicate(a));
    }
}
